package c.h.a.z;

import android.hardware.SensorManager;
import c.h.a.m0.p.a;
import com.liuzh.deviceinfo.card.SensorAppCard;
import java.util.List;
import java.util.Objects;

/* compiled from: lambda */
public final /* synthetic */ class q implements Runnable {
    public final /* synthetic */ SensorAppCard a;

    public /* synthetic */ q(SensorAppCard sensorAppCard) {
        this.a = sensorAppCard;
    }

    public final void run() {
        List installedApplications;
        SensorAppCard sensorAppCard = this.a;
        Objects.requireNonNull(sensorAppCard);
        int i = 0;
        try {
            int i2;
            installedApplications = sensorAppCard.getContext().getPackageManager().getInstalledApplications(0);
            if (installedApplications == null) {
                i2 = 0;
            } else {
                i2 = installedApplications.size();
            }
            sensorAppCard.c = i2;
        } catch (Exception unused) {
        }
        SensorManager sensorManager = (SensorManager) sensorAppCard.getContext().getSystemService("sensor");
        if (sensorManager != null) {
            installedApplications = sensorManager.getSensorList(-1);
            if (installedApplications != null) {
                i = installedApplications.size();
            }
            sensorAppCard.d = i;
        }
        a.b(sensorAppCard.e);
    }
}
